﻿using B.S.Databasic.Domain.RBAC;
using B.S.Databasic.ErrorCode;
using MediatR;

namespace B.S.Databasic.Api.Read.Application.Command.Permission
{
    /// <summary>
    /// 获取数据库权限树命令
    /// </summary>
    public class GetPermissionsFromDatabaseTreeCommand : IRequest<ApiResult<List<PermissionTreeDTO>>>
    {
    }
    /// <summary>
    /// 权限树数据
    /// </summary>
    public class PermissionTreeDTO
    {
        /// <summary>
        /// 权限名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 权限值
        /// </summary>
        public long Id { get; set; }
        /// <summary>
        /// 子节点
        /// </summary>
        public List<PermissionTreeDTO>? Children { get; set; }
    }
}
